/*
 * Powered By [rapid-framework]
 * Web Site: http://www.rapid-framework.org.cn
 * Google Code: http://code.google.com/p/rapid-framework/
 * Since 2008 - 2012
 */

package com.tudou.searchcontrol.model;

import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;
import org.apache.commons.lang.builder.ToStringStyle;

public class Video implements java.io.Serializable{
	private static final long serialVersionUID = 1L;
	
	//alias
	public static final String TABLE_ALIAS = "Video";
	public static final String ALIAS_ID = "id";
	public static final String ALIAS_ALBUM_ID = "albumId";
	public static final String ALIAS_PLAY_ID = "playId";
	public static final String ALIAS_SEQUEN = "sequen";
	
	//date formats
	
	//可以直接使用: @Length(max=50,message="用户名长度不能大于50")显示错误消息
	//columns START
    /**
     * id       db_column: id 
     */	
	
	private java.lang.Long id;
    /**
     * albumId       db_column: albumId 
     */	
	
	private java.lang.Long albumId;
    /**
     * playId       db_column: playId 
     */	
	
	private java.lang.Long playId;
    /**
     * sequen       db_column: sequen 
     */	
	
	private java.lang.Integer sequen;
	//columns END

	public Video(){
	}

	public Video(
		java.lang.Long id
	){
		this.id = id;
	}

	public void setId(java.lang.Long value) {
		this.id = value;
	}
	
	public java.lang.Long getId() {
		return this.id;
	}
	public void setAlbumId(java.lang.Long value) {
		this.albumId = value;
	}
	
	public java.lang.Long getAlbumId() {
		return this.albumId;
	}
	public void setPlayId(java.lang.Long value) {
		this.playId = value;
	}
	
	public java.lang.Long getPlayId() {
		return this.playId;
	}
	public void setSequen(java.lang.Integer value) {
		this.sequen = value;
	}
	
	public java.lang.Integer getSequen() {
		return this.sequen;
	}

	public String toString() {
		return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
			.append("Id",getId())
			.append("AlbumId",getAlbumId())
			.append("PlayId",getPlayId())
			.append("Sequen",getSequen())
			.toString();
	}
	
	public int hashCode() {
		return new HashCodeBuilder()
			.append(getId())
			.toHashCode();
	}
	
	public boolean equals(Object obj) {
		if(obj instanceof Video == false) return false;
		if(this == obj) return true;
		Video other = (Video)obj;
		return new EqualsBuilder()
			.append(getId(),other.getId())
			.isEquals();
	}
}

